package org.csu.mypetstore.service;

import org.csu.mypetstore.domain.Account;
import org.csu.mypetstore.persistence.AccountDao;
import org.csu.mypetstore.persistence.impl.AccountDaoImpl;

public class AccountService {
    private AccountDao accountDao;
    public AccountService()
    {
        accountDao=new AccountDaoImpl();
    }
    public Account getAccountByUsername(String s) throws Exception
    {
        return accountDao.getAccountByUsername(s);
    }
    public Account getAccountByUsernameAndPassword(Account account)
    {
        return accountDao.getAccountByUsernameAndPassword(account);
    }
    public void insertAccount(Account account)
    {
        accountDao.insertAccount(account);
    }
    public void insertProfile(Account account)
    {
        accountDao.insertProfile(account);
    }
    public void insertSignOn(Account account)
    {
        accountDao.insertSignOn(account);
    }
    public void updateAccount(Account account,String s)
    {
        accountDao.updateAccount(account,s);
    }
    public void updateProfile(Account account)
    {
        accountDao.updateProfile(account);
    }
    public void updateSignOn(Account account)
    {
        accountDao.updateSignOn(account);
    }
    public void getStatus()
    {
        accountDao.getStatus();
    }
    public void updateUsername(String s)
    {
        accountDao.updateUsername(s);
    }
    public void updateCartUsername(Account account,String s)
    {
        accountDao.updateCartUsername(account,s);
    }

}
